package cn.et.mapper;



import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

import cn.et.entity.Bibi;
import cn.et.entity.BibiExample;
@Mapper
public interface BibiMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @SelectProvider(type=BibiSqlProvider.class, method="countByExample")
    long countByExample(BibiExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @DeleteProvider(type=BibiSqlProvider.class, method="deleteByExample")
    int deleteByExample(BibiExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @Delete({
        "delete from bibi",
        "where bid = #{bid,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer bid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @Insert({
        "insert into bibi (bid, bname, ",
        "lid)",
        "values (#{bid,jdbcType=INTEGER}, #{bname,jdbcType=VARCHAR}, ",
        "#{lid,jdbcType=INTEGER})"
    })
    int insert(Bibi record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @InsertProvider(type=BibiSqlProvider.class, method="insertSelective")
    int insertSelective(Bibi record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @SelectProvider(type=BibiSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="bid", property="bid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="bname", property="bname", jdbcType=JdbcType.VARCHAR),
        @Result(column="lid", property="lid", jdbcType=JdbcType.INTEGER)
    })
    List<Bibi> selectByExampleWithRowbounds(BibiExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @SelectProvider(type=BibiSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="bid", property="bid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="bname", property="bname", jdbcType=JdbcType.VARCHAR),
        @Result(column="lid", property="lid", jdbcType=JdbcType.INTEGER)
    })
    List<Bibi> selectByExample(BibiExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @Select({
        "select",
        "bid, bname, lid",
        "from bibi",
        "where bid = #{bid,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="bid", property="bid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="bname", property="bname", jdbcType=JdbcType.VARCHAR),
        @Result(column="lid", property="lid", jdbcType=JdbcType.INTEGER)
    })
    Bibi selectByPrimaryKey(Integer bid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @UpdateProvider(type=BibiSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Bibi record, @Param("example") BibiExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @UpdateProvider(type=BibiSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Bibi record, @Param("example") BibiExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @UpdateProvider(type=BibiSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Bibi record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table bibi
     *
     * @mbg.generated Wed Dec 20 11:19:53 CST 2017
     */
    @Update({
        "update bibi",
        "set bname = #{bname,jdbcType=VARCHAR},",
          "lid = #{lid,jdbcType=INTEGER}",
        "where bid = #{bid,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Bibi record);
}